<script language="javascript" type="text/javascript">
	function doimkupdatesuccess(xml)
	{
		var status=$(xml).find("status").text();
		var message=$(xml).find("message").text();
		msgbox(status,message);
	
		if(status=="ok") $("#fdoimk").dialog("close");
	}
	
	function doimkupdate()
	{
		$.ajax({
			url:"modules/account/doimk.php",
			type:"POST",
			dataType:"xml",
			data:"mkcu="+ encodeURI($("#filterdoimk #mkcu").val())+"&mk1="+encodeURI($("#filterdoimk #mk1").val())+"&mk2="+encodeURI($("#filterdoimk #mk2").val()),
			success:doimkupdatesuccess
		});
	}
	function doimk()
	{
	
		if($('#fdoimk').is(":data(dialog)")) return;
		$("body").append("<div id=\"fdoimk\" style=\"display:none;\"></div>");
		var fdoimkoptions={
			width:520,
			height:300,
			title:"Đổi mật khẩu ",
			disabled:true,
			buttons:{
				"Đổi":doimkupdate
			},
			close:function(){
				$("#fdoimk").remove();
			}
		};
		$("#fdoimk").dialog(fdoimkoptions);
		$("#fdoimk").load("modules/doimk/doimk.php","",function(){
			$("#fdoimk").dialog("option","disabled",false);
		});
	}
</script>
